Next | Prev | Up | Top | Contents | Index

Setting Frame Scheduler Signals

The frame scheduler sends signals to the FRS control process.

Note: In earlier versions of REACT/Pro, the Frame Scheduler sent these signals to all processes queued to that Frame Scheduler as well as the FRS controller. That is no longer the case. You can remove signal handlers for these signals from activity processes, if they exist. The signal numbers used for most events can be modified. The signal numbers can be queried using frs_getattr(FRS_ATTR_SIGNALS) and changed using frs_setattr(FRS_ATTR_SIGNALS), in each case passing an frs_signal_info structure. This structure contains room for four signal numbers, as shown in Table 7-3

Signal Numbers Passed in frs_signal_info_t
Field NameSignal PurposeDefault Signal Number
sig_underrunNotify FRS controller of Underrun.SIGUSR1
sig_overrunNotify FRS controller of Overrun.SIGUSR2
sig_dequeueNotify an activity process that it has been dequeued with frs_premove(). 0 (do not send)
sig_unframeschedNotify an activity process that it has been removed from the last or only queue in which it was enqueued.SIGRTMIN

Signal numbers must be changed before the Frame Scheduler is started. All the numbers must be specified to frs_setattr(), so the proper way to set any number is to first file the frs_signal_info_t using frs_getattr(). The function in Example 7-6 sets the signal numbers for Overrun and Underrun from its arguments.

Example 7-6 : Function to Set Frame Scheduler Signals

int
setUnderOverSignals(frs_t *frs, int underSig, int overSig)
{
  int error;
  frs_signal_info_t work;
  error = frs_getattr(frs,0,0,FRS_ATTR_SIGNALS,(void*)&work);
  if (!error)
  {
    work.sig_underrun = underSig;
    work.sig_overrun = overSig;
    error = frs_setattr(frs,0,0,FRS_ATTR_SIGNALS,(void*)&work);
  }
  return error;
}

Next | Prev | Up | Top | Contents | Index